



<div class="bjui-pageContent tableContent" id="div1">
    <table>
        <div id="output" style="width:100%;height:80%;" ></div>
<script  src="${request.getContextPath()}/js/echarts/echarts.js"></script>
<script  src="${request.getContextPath()}/js/echarts/echarts-tool.js"></script>
<g:if test="${outputrpt.size()>0}">
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var contextPath = "${request.getContextPath()}";
        eChartsTool.init(contextPath);
        var data=[];
        <g:each in="${outputrpt}" status="i" var="tableInstance">
        data.push('${tableInstance.TIME}')
        </g:each>

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '产能看板',
                x:'center',
                textStyle:{fontSize:25}
            },
            tooltip: {},
            legend: {
                data:['目标产能','实际产能','累计目标产能','累计实际产能'],
                y:'bottom',
                textStyle:{fontSize:25}

            },
            xAxis: {
                "axisLabel":{
                    "interval":0,
                    "rotate":45,
                    textStyle:{fontSize:15}
                },
                data:data

            },
            yAxis : [
                {
                    type : 'value',
                    name:'',
                    axisLabel : {
                        formatter: '{value}',
                        textStyle:{fontSize:25}
                    },
                    show:true
                },
                {
                    type : 'value',
                    name:'',

                    axisLabel : {
                        formatter: '{value}',
                        textStyle:{fontSize:25}
                    },
                    show:true
                }
            ],
            series: [{
                name: '目标产能',
                type: 'bar',
                data: ${outputrpt.TARGET_OUTPUT}
            },
                {
                    name: '实际产能',
                    type: 'bar',
                    data: ${outputrpt.ACTUAL_OUTPUT}
                },
                {
                    name: '累计目标产能',
                    type: 'line',
                    data: ${outputrpt.TOTAL_TARGET_OUTPUT},
                    yAxisIndex: 1
                },
                {
                    name: '累计实际产能',
                    type: 'line',
                    data: ${outputrpt.TOTAL_ACTUAL_OUTPUT},
                    yAxisIndex: 1
                }]
        };

        // 使用刚指定的配置项和数据显示图表。
        eChartsTool.setOption("macarons", document.getElementById('output'), option);

    </script>
</g:if>
        </table>
</div>